#include<iostream>
#include<cstring>
using namespace std;

int a[100010];

int main() {
    int n, w, ans;
    memset(a, 0, sizeof(a));
    cin >> n >> w;
    for(int i=0; i<n; i++)  cin >> a[i];
    cout << a[0] << " ";
    for(int i=1; i<n; i++) {
        ans = ((i+1)*w/100) >= 1 ? (i+1)*w/100 : 1;
        int t = a[i];
        int j = i - 1;
        while(j >= 0 && a[j] < t) {
            a[j+1] = a[j];
            j--;
        }
        a[j+1] = t;
        cout << a[ans - 1] << " ";
    }
    return 0;
}